package com.wingscode.modules.common.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wingscode.modules.common.entity.ChatDetailEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

/**
 * 聊天内容
 *
 * @author yan
 */
@Mapper
public interface ChatDetailDao extends BaseMapper<ChatDetailEntity> {
    void updateByFromAgent(ChatDetailEntity chatDetail);

    void updateByToAgent(ChatDetailEntity chatDetail);

    void updateByToUserId(ChatDetailEntity chatDetail);

    IPage<ChatDetailEntity> getDetail(IPage<ChatDetailEntity> page, @Param("chatId") Integer chatId);

    void deleteByChatId(@Param("chatId") Integer chatId);
}
